import https from "../../https";
import type { SysRole,RoleListParm,SaveMenuParm } from "./RoleModel";
//新增角色
export const addApi = (parm:SysRole) =>{
    return https.post("/api/role",parm)
}
//角色列表接受
export const getApi = (parm:RoleListParm)=>{
    return https.get("/api/role/getList",parm)
}
//编辑
export const editApi = (parm:SysRole) =>{
    return https.put("/api/role",parm)
}
//删除
export const deleteApi = (roleId:string) =>{
    return https.delete(`/api/role/${roleId}`)
}
//角色下拉
export const getSelectApi = () =>{
    return https.get("/api/role/selectList")
}
//分配菜单
export const saveRoleMenuApi = (parm:SaveMenuParm) =>{
    return https.post("/api/role/saveRoleMenu",parm)
}